//
//  CommunicationManager.h
//  MultiplayerTestGame
//
//  Created by  Stefan Nestorov on 12/25/14.
//  Copyright (c) 2014 Nestorov Engineering. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <SFS2XAPIIOS/SmartFox2XClient.h>

@protocol CommunicationDelegate <NSObject>

- (void)resetTimerAndShouldShowHint:(BOOL)shouldShowHint additionalDelay:(float)delay;

@end

@interface CommunicationManager : NSObject <ISFSEvents>

+ (instancetype)sharedManager;
- (void)connectToWebService;
- (void)sendSwapSFSObjectToServer:(SFSObject *)swapSFSObject;
- (void)sendRematchGameRequest;
- (NSArray *)getBuddyList;
- (void)inviteBuddyToPlayGame:(NSString *)buddyname;
- (void)inviteUserToBuddylist:(NSString *)username;
- (void)removeUserFromBuddylist:(NSString *)username;
- (void)sendJoinToWaitingListRequest;
- (void)getListOfUsersForName:(NSString *)username;
- (NSString *)getMyUsername;
- (void)getRankingLists;
- (void)updateChosenHeroInfo;
- (void)updateMyselfMoney:(NSInteger)moneyToUpdate;
- (void)sendReturnToLobbyRequest;
- (void)disconnect;
- (BOOL)isConnected;
- (void)getAmountOfMoneyFromServer;
- (void)getStoreInfoFromServer;
- (void)sendUpgradeRequestForHero:(NSInteger)heroType andUpgrade:(NSInteger)upgradeType;

@property (weak) id<CommunicationDelegate> communicationDelegate;
@property (readwrite) BOOL isInGame;
@property (nonatomic, assign) BOOL isConnecting;
@property (nonatomic, assign) BOOL isLoggedIn;

@end
